﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HtmlAgilityPack;

namespace Kooboo.HtmlFunc.Exceptions
{
    public class FuncNestingErrorException : FuncCommentNodeException
    {
        public FuncNestingErrorException(string fileName, HtmlCommentNode node, HtmlCommentNode inclusiveNode)
            : base(fileName, node)
        {
            this.InclusiveNode = inclusiveNode;
        }

        public HtmlCommentNode InclusiveNode
        {
            get;
            private set;
        }

        public override string ExceptionDescription
        {
            get
            {
                return string.Format("Can not nest {0} in {1}.", this.ExceptionNode.Comment, this.InclusiveNode.Comment);
            }
        }
    }
}
